﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;


namespace PJOnimal
{
    class MapObj
    {
        private Texture2D _texture2d;
        private float _height = 0;

        public float Height
        {
            get { return _height; }
            set { _height = value; }
        }
        private float _width = 0;

        public float Width
        {
            get { return _width; }
            set { _width = value; }
        }
        public Texture2D Texture2d
        {
            get { return _texture2d; }
            set { _texture2d = value; }
        }
        private float _x;

        public float X
        {
            get { return _x; }
            set { _x = value; }
        }
        private float _y;

        public float Y
        {
            get { return _y; }
            set { _y = value; }
        }
        public MapObj()
        {
            _texture2d = null;
            _x = 0;
            _y = 0;
        }
        public MapObj(Texture2D texture,float x,float y)
        {
            _texture2d = texture;
            _x = x;
            _y = y;
        }
        public void Update(float khoangCach)
        {
            _x = _x+khoangCach ;            
        }
        public void UpdateToaDoCu(float x, float y)
        {
            _x = x;
            _y = y;
        }
        public void Draw(SpriteBatch spriteBatch)
        {
            //for (int i = 0; i < _nTexture2d;i++ )
            spriteBatch.Draw(_texture2d, new Vector2(_x, _y), Color.White);
        }
    }
}
